home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / windows / games / wincapt.arj / DIBAPI.MAK < prev    next >
Makefile  |  1992-07-16  |  4KB  |  152 lines

  1. # -----------------------------------------------------------------
  2. # File name:  DIBAPI.MAK
  3. #
  4. # This file contains the build information necessary to create
  5. # DIBAPI.DLL.  To build a DEBUG version, build with:
  6. #
  7. #     NMAKE /f DIBAPI.MAK DEBUG=1
  8. #
  9. # To build for a release version, build with:
  10. #
  11. #     NMAKE /f DIBAPI.MAK
  12. #
  13. # To assume Microsoft C 6.0 or earlier, add the macro definition
  14. #
  15. #     C6=1
  16. #
  17. # to the appropriate line above.
  18. #
  19. # Development Team:  Dan Ruder
  20. #                    Mark Bader
  21. #
  22. # Written by Microsoft Product Support Services, Windows Developer Support.
  23. #
  24. # Copyright (c) 1991, 1992 Microsoft Corporation.  All rights reserved.
  25. # -----------------------------------------------------------------
  26.  
  27.  
  28. # Options:
  29. #
  30. #   DEBUG=1  build debug version.  Default is nodebug version.
  31. #   C6=1     assume Microsoft C 6.0 or earlier, default is to assume C7.
  32. #
  33.  
  34.  
  35. # Different options depending on debug or release version
  36. !if "$(DEBUG)"=="1"
  37. DLL_CFLAGS = -c -W3 -Alnw -Gsw -Zpie -Od
  38. DLL_LINKFLAGS = /NOD/NOE/CO/MAP
  39. ASM_FLAGS = -MX
  40. !else
  41. DLL_CFLAGS = -c -W3 -Alnw -Gsw -Zpe -Oselg
  42. DLL_LINKFLAGS = /NOD/NOE
  43. ASM_FLAGS = -MX
  44. !endif
  45.  
  46. #
  47. # Different library options. For C7, we need oldnames.lib because we
  48. # use Microsoft extensions without underscores.
  49. #
  50.  
  51. !if "$(C6)"=="1"
  52. LIBS    = libw mdllcew
  53. !else
  54. LIBS    = libw mdllcew oldnames
  55. !endif
  56.  
  57. all: dibapi.dll 
  58.  
  59. DLL_OBJS = dllinit.obj wepcode.obj file.obj copy.obj \
  60.        errors.obj print.obj dibutil.obj hook.obj
  61.  
  62. EXTOBJS = libentry.obj
  63.  
  64. # Inference rules
  65.  
  66. .c.obj:
  67.     cl $(DLL_CFLAGS) $*.c
  68.  
  69. .asm.obj:
  70.     masm $(ASM_FLAGS) $*.asm
  71.  
  72.  
  73. # Rules for building DIBAPI.DLL.
  74.  
  75. dllinit.obj: dllinit.c dibdll.h
  76.  
  77. wepcode.obj: wepcode.c
  78.     cl $(DLL_CFLAGS) -NT WEPSEG wepcode.c
  79.  
  80. # The next target is libentry.obj.
  81. #
  82. # If you have Microsoft C/C++ 7.0, libentry.obj is already included
  83. # in the libraries, so there is no need to explicitly include it here.
  84.  
  85. # If you have Microsoft C version 6.0, you may use the libentry.obj that
  86. # comes with the SDK or if you want to do advanced processing in
  87. # libentry.asm, you may assemble the one from the SDK.  To do this,
  88. # copy libentry.asm from your SDK directory.  Note that you must remove
  89. # the line "include CONVDLL.INC" from the 3.1 libentry.asm for it
  90. # to assmeble correctly.
  91.  
  92. # This line is for MASM 6.0.  If you use MASM 6.0, be sure to use the
  93. # cmacros.inc file that comes with it.  Do not use the cmacros.inc that
  94. # comes with the SDK as it is for MASM 5.1.
  95.  
  96. #libentry.obj: libentry.asm
  97. #        ml $(-c -Cx -W2 -Zm) libentry.asm
  98.  
  99. # This line is for MASM 5.1.  If you use MASM 5.1, you can use the
  100. # cmacros.inc that comes with the SDK.
  101. #
  102. # libentry.obj: libentry.asm
  103. #    masm -MX libentry.asm;
  104.  
  105. file.obj: file.c dibapi.h dibutil.h 
  106.  
  107. copy.obj: copy.c dibapi.h dibutil.h 
  108.  
  109. errors.obj: errors.c dibapi.h
  110.  
  111. print.obj: print.c dibapi.h dibutil.h dibdll.h 
  112.  
  113. dibutil.obj: dibutil.c dibutil.h dibapi.h
  114.  
  115. # We will add the code for our Hook Proc to the DIBAPI.DLL so
  116. # we don't require 2 dlls for WINCAP to work, although it
  117. # isn't officially part of the DIB API set.
  118.  
  119. hook.obj: hook.c
  120.     cl $(DLL_CFLAGS) -NT HOOKSEG hook.c
  121.  
  122. dibapi.res: dibapi.rc dibdll.h
  123.     rc -r dibapi.rc
  124.  
  125.  
  126. # NOTE: The dependencies in this file are not set up to build the
  127. # DLL properly if the file DIBAPI.DLL exists but the import library
  128. # DIBAPI.LIB is out of date or is deleted. In this case, the
  129. # makefile never knows that the library needs to be rebuilt.
  130. #
  131. # To take care of this situation, just delete the file DIBAPI.DLL and
  132. # re-run NMAKE on this makefile.
  133. #
  134. # To modify this makefile to allow for this case would require
  135. # redundancies and multiple calls to implib, so a tradeoff was made
  136. # to make this makefile run a bit quicker, and be a bit easier to
  137. # understand.
  138.  
  139.  
  140. dibapi.dll: $(DLL_OBJS) dibapi.res dibapi.def
  141.     link @<<
  142.     $(DLL_LINKFLAGS)+
  143.     $(DLL_OBJS) +
  144.     $(EXTOBJS)
  145.     dibapi.dll
  146.     dibapi.map/map/al:16
  147.     $(LIBS)
  148.     dibapi.def
  149. <<
  150.     rc dibapi.res dibapi.dll
  151.     implib dibapi.lib dibapi.def
  152.